package typechecker.ast.term;

import typechecker.ast.type.TypeExpression;

public class LambdaAbstraction extends Expression{
	private TypeExpression type;
	private TermVariable var;
	private Expression body;
	
	public LambdaAbstraction(TermVariable var, TypeExpression type,  Expression body) {
		this.type = type;
		this.var = var;
		this.body = body;
	}

	@Override
	public String preetyPrint() {
		String ret = "fn<" + type.preetyPrint() +"> "  + var.preetyPrint() + " = " + body.preetyPrint();
		return ret;
	}
	
	public Expression getBody() {
		return body;
	}
	
	public TypeExpression getType() {
		return type;
	}
	
	public TermVariable getVar() {
		return var;
	}
}
